home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Powervisor v1.10b disk2.adf / LookingAtThings < prev    next >
Text File  |  1991-09-22  |  47KB  |  1,161 lines

  1. *----------------------------*
  2. * Tutorial : LookingAtThings * Sun Sep 22 12:47:41 1991
  3. *----------------------------*
  4.  
  5. ===================== Commands used in this tutorial =========================
  6.  
  7.    addstruct   Add structures to the 'stru' list
  8.    addtag      Add a tag to the current tag list
  9.    attc        The key attachment list
  10.    clearstruct Clear all structures in the 'stru' list
  11.    cleartags   Clear all tags in the current tag list
  12.    conf        Autoconfig list
  13.    crsh        Crash list
  14.    dbug        Debug list
  15.    devs        Exec device list
  16.    dosd        Dos device list
  17.    exec        ExecBase structure list
  18.    fdfi        Fd file list
  19.    fils        File list
  20.    for         For each element in list execute a command
  21.    font        Font list
  22.    func        Function monitor list
  23.    gadgets     Show all gadgets in a window
  24.    graf        GraphicsBase structure list
  25.    hunks       Show all hunks for a process
  26.    ihan        Input handler list
  27.    info        Give information about an element in a list
  28.    interprete  Interprete some memory as a structure (from the 'stru' list)
  29.    intb        IntuitionBase structure list
  30.    libinfo     Ask information about a library function from a fd-file
  31.    intr        Interrupt list
  32.    libs        Library list
  33.    list        Show a list (tasks, libraries, message ports, ...)
  34.    llist       Traverse a list and show all elements in list
  35.    loadfd      Load a fd-file
  36.    loadtags    Load tags in the current tag list
  37.    lock        Lock list
  38.    lwin        Logical window list
  39.    memory      List memory
  40.    memr        Memory node list
  41.    mmuregs     Show all registers from mmu
  42.    mmureset    Reset the mmu tree
  43.    mmutree     Show the mmu tree
  44.    mode        Set PowerVisor preferences
  45.    moni        Monitor list
  46.    owner       Search owner of memory
  47.    pathname    Get pathname from lock
  48.    port        Message port list
  49.    print       Print a string
  50.    pubs        Public screen list
  51.    pwin        The physical window list
  52.    remstruct   Remove a structure from the 'stru' list
  53.    remtag      Remove a tag from the current tag list
  54.    resm        Resident module list
  55.    reso        Resource list
  56.    savetags    Save all tags in the current tag list
  57.    scrs        Screen list
  58.    sema        Semaphore list
  59.    specregs    Show all special 68020..68030 registers
  60.    speek       Peek from memory (using mmu)
  61.    spoke       Poke in memory (using mmu)
  62.    stru        Structure list
  63.    tags        Show all tags in the current tag list
  64.    task        Task and process list
  65.    tg          Temporarily set another tag list as current
  66.    unasm       Disassemble memory
  67.    usetag      Set another current tag list number
  68.    view        List memory while using tags to determine the type of memory
  69.    wins        Window list
  70.  
  71.  
  72. ===================== Functions used in this tutorial ========================
  73.  
  74.    apeek       Peek address from structure
  75.    base        Get the first element in the current list
  76.    curlist     Get the current list
  77.    lastmem     Get last memory used by 'memory', 'unasm' or 'view'
  78.    peek        Peek element from structure
  79.    stsize      Ask the size of a structure definition
  80.    taglist     Ask the current tag list number
  81.  
  82.  
  83. ============================== Introduction ==================================
  84.  
  85. PowerVisor can ²display memory, ²disassemble instructions, ²show structures,
  86. ²give information, ... . In short, PowerVisor has a lot of instruction to SHOW
  87. you something. This tutorial file describes all these commands. All commands
  88. in this tutorial give you information of some kind.
  89.  
  90.  
  91. ========================== Simple Memory Viewing =============================
  92.  
  93. The simplest way to ³look at memory is using the ²²'memory' command. Simply
  94. try it :
  95.  
  96. < memory 0 100 <enter>
  97.  
  98. or
  99.  
  100. < m 0 100 <enter>
  101.  
  102. > 00000000: 00000000 07E007CC 00F80834 00F80B16              ...........4....
  103. > 00000010: 00F80ADA 00F80ADC 00F80ADE 00F80AE0              ................
  104. > 00000020: 00F80C00 00F80AE4 00F80AE7 00F80AE8              ................
  105. > 00000030: 00F80AEA 00F80AEC 00F80AEE 00F80AF0              ................
  106. > 00000040: 00F80AF2 00F80AF4 00F80AF6 00F80AF8              ................
  107. > 00000050: 00F80AFA 00F80AFC 00F80AFE 00F80B00              ................
  108. > 00000060: 00F80B02                                         ....
  109.  
  110. You will now see 100 bytes or 25 longwords of memory starting on location 0.
  111.  
  112. You can also use :
  113.  
  114. < m 0 <enter>
  115. > 00000000: 00000000 07E007CC 00F80834 00F80B16              ...........4....
  116. > 00000010: 00F80ADA 00F80ADC 00F80ADE 00F80AE0              ................
  117. > 00000020: 00F80C00 00F80AE4 00F80AE7 00F80AE8              ................
  118. > 00000030: 00F80AEA 00F80AEC 00F80AEE 00F80AF0              ................
  119. > 00000040: 00F80AF2 00F80AF4 00F80AF6 00F80AF8              ................
  120. > 00000050: 00F80AFA 00F80AFC 00F80AFE 00F80B00              ................
  121. > 00000060: 00F80B02 00F810F4 00F81152 00F81188              ...........R....
  122. > 00000070: 00F811E6 00F8127C 00F812C6 00F81310              .......|........
  123. > 00000080: 00F80B70 00F80B72 00F80B74 00F80B76              ...p...r...t...v
  124. > 00000090: 00F80B78 00F80B7A 00F80B7C 00F80B7E              ...x...z...|...~
  125. > 000000A0: 00F80B80 00F80B82 00F80B84 00F80B86              ................
  126. > 000000B0: 00F80B88 00F80B8A 00F80B8C 00F80B8E              ................
  127. > 000000C0: 00F80B90 00F80B92 00F80B94 00F80B96              ................
  128. > 000000D0: 00F80B98 00F80B9A 00F80B9C 00F80B9E              ................
  129. > 000000E0: 00F80BA0 00F80BA2 00F80BA4 00F80BA6              ................
  130. > 000000F0: 00F80BA8 00F80BAA 00F80BAC 00F80BAE              ................
  131. > 00000100: 0030A6FC 00006600 00000610 00000000              .0....f.........
  132. > 00000110: 200066FB 00006600 0000A600 203066FA               .f...f..... 0f.
  133. > 00000120: 003026FB 00006600 00006630 005066F7              .0&...f...f0.Pf.
  134. > 00000130: 001066FB 00006600 00006600 001026F7              ..f...f...f...&.
  135.  
  136. So you don't have to specify the number of bytes to print. The default number
  137. is 320 (Note that PowerVisor remembers the last number of bytes used, so the
  138. default number is actually equal to that number)
  139.  
  140. If you prefer the output of this command in another format, you can do this
  141. with the 'mode' command :
  142.  
  143. < mode byte <enter>
  144. < m 0 100 <enter>
  145. > 00000000: 00 00 00 00 07 E0 07 CC 00 F8 08 34 00 F8 0B 16  ...........4....
  146. > 00000010: 00 F8 0A DA 00 F8 0A DC 00 F8 0A DE 00 F8 0A E0  ................
  147. > 00000020: 00 F8 0C 00 00 F8 0A E4 00 F8 0A E7 00 F8 0A E8  ................
  148. > 00000030: 00 F8 0A EA 00 F8 0A EC 00 F8 0A EE 00 F8 0A F0  ................
  149. > 00000040: 00 F8 0A F2 00 F8 0A F4 00 F8 0A F6 00 F8 0A F8  ................
  150. > 00000050: 00 F8 0A FA 00 F8 0A FC 00 F8 0A FE 00 F8 0B 00  ................
  151. > 00000060: 00 F8 0B 02                                      ....
  152.  
  153. Or back to normal with :
  154.  
  155. < mode long <enter>
  156.  
  157. Other formats are: 'mode word' or 'mode ascii'.
  158.  
  159. ²Pressing enter with an empty commandline will cause the ²memory listing to
  160. continue (if the last command was a 'memory' command). (This is also
  161. the case if the last command was a 'view' or an 'unasm' (see later)).
  162.  
  163. Typing 'memory' with no arguments will also cause a ³continued memory listing.
  164.  
  165. You can use the 'lastmem' function to see where Powervisor will continue
  166. the memory listing :
  167.  
  168. < disp lastmem() <enter>
  169. > 00000064 , 100
  170.  
  171. Note that when you are debugging a program, this command will also show
  172. the 9 first characters of a symbol when there is one on some address.
  173.  
  174.  
  175. ========================== Disassembling Memory ==============================
  176.  
  177. If you want to ²²disassemble memory, you can use the 'unasm' command. This
  178. command disassembles ¹68000, ¹68010, ¹68020, ¹68030, ¹68040, ¹68881, ¹68882
  179. and ¹68851 code.
  180.  
  181. < unasm 0 <enter>
  182.  
  183. or
  184.  
  185. < u 0 <enter>
  186.  
  187. > 00000000: 0000 0000                     ORI.B    #0,D0
  188. > 00000004: 07E0                          BSET     D3,-(A0)
  189. > 00000006: 07CC 00F8                     MOVEP.L  D3,($F8,A4)
  190. > 0000000A: 0834 00F8 0B16 00F8           BTST     #$F8,([A0],D0.L*2,$F8)
  191. > 00000012: 0ADA 00F8                     CAS      D0,D3,(A2)+
  192. > 00000016: 0ADC 00F8                     CAS      D0,D3,(A4)+
  193. > 0000001A: 0ADE 00F8                     CAS      D0,D3,(A6)+
  194. > 0000001E: 0AE0 00F8                     CAS      D0,D3,-(A0)
  195. > 00000022: 0C00 00F8                     CMPI.B   #$F8,D0
  196. > 00000026: 0AE4 00F8                     CAS      D0,D3,-(A4)
  197. > 0000002A: 0AE7 00F8                     CAS      D0,D3,-(A7)
  198. > 0000002E: 0AE8 00F8 0AEA                CAS      D0,D3,($AEA,A0)
  199. > 00000034: 00F8 0AEC                     ORI.?    #$F8,($AEC)
  200. > 00000038: 00F8 0AEE                     ORI.?    #$F8,($AEE)
  201. > 0000003C: 00F8 0AF0                     ORI.?    #$F8,($AF0)
  202. > 00000040: 00F8 0AF2                     ORI.?    #$F8,($AF2)
  203. > 00000044: 00F8 0AF4                     ORI.?    #$F8,($AF4)
  204. > 00000048: 00F8 0AF6                     ORI.?    #$F8,($AF6)
  205. > 0000004C: 00F8 0AF8                     ORI.?    #$F8,($AF8)
  206. > 00000050: 00F8 0AFA                     ORI.?    #$F8,($AFA)
  207.  
  208. The default number of instructions to disassemble is 20, but you can choose
  209. another number after the address.
  210.  
  211. < u 0 5 <enter>
  212. > 00000000: 0000 0000                     ORI.B    #0,D0
  213. > 00000004: 07E0                          BSET     D3,-(A0)
  214. > 00000006: 07CC 00F8                     MOVEP.L  D3,($F8,A4)
  215. > 0000000A: 0834 00F8 0B16 00F8           BTST     #$F8,([A0],D0.L*2,$F8)
  216. > 00000012: 0ADA 00F8                     CAS      D0,D3,(A2)+
  217.  
  218. If you do not like the words in this output you can disable them with :
  219.  
  220. < mode noshex <enter>
  221.  
  222. < u 0 5 <enter>
  223. > 00000000:                               ORI.B    #0,D0
  224. > 00000004:                               BSET     D3,-(A0)
  225. > 00000006:                               MOVEP.L  D3,($F8,A4)
  226. > 0000000A:                               BTST     #$F8,([A0],D0.L*2,$F8)
  227. > 00000012:                               CAS      D0,D3,(A2)+
  228.  
  229. Or enable them :
  230.  
  231. < mode shex <enter>
  232.  
  233. When you are debugging a program, this command shows all ³labels and symbols
  234. present in this program (Therefor it can be useful to disable the words in
  235. the output, that way PowerVisor can show longer labels).
  236.  
  237. Pressing enter with an empty commandline will cause the disassembly to
  238. continue (if the last command was a 'unasm' command).
  239.  
  240. Typing 'unasm' with no arguments will also cause a ²continued disassembly.
  241.  
  242.  
  243. ============================= Listing Things =================================
  244.  
  245. You can also ¹¹list a lot of things in PowerVisor. The ²current list concept
  246. was already explained in the 'GettingStarted' tutorial file. I assume
  247. you have read that file.
  248.  
  249. The following lists are available at this moment :
  250. (All lists with a '*' have more information in the AmigaDOS 2.0 version,
  251. this (extra) information can be viewed with the 'info' command or the 'list'
  252. command (the 'info' command also works on the AmigaDOS 1.3 version but gives
  253. less information))
  254.  
  255.   Big structures :
  256.    Exec *      the listing of the ²ExecBase structure
  257.    Intb        ²IntuitionBase structure
  258.    Graf *      ³Graphics base structure
  259.   Exec/dos/graphics and intuition things :
  260.    Task *      The listing of the ¹tasks in the system (default list)
  261.    Libs        ¹Exec-Libraries
  262.    Devs        ¹Exec-devices
  263.    Reso        ¹Exec-Resources
  264.    INTR        ¹Exec-Interrupts
  265.    Memr        ²Memory list
  266.    Port        ²Message ports
  267.    Wins *      All ¹windows
  268.    Scrs        ¹Screens
  269.    Font        ¹Fonts currently in memory
  270.    DOsd        ¹Dos-devices
  271.    SEma        ¹Semaphores
  272.    RESM        ²Resident modules
  273.    FIls        ²Open files
  274.    LOck        ¹Locks
  275.    IHan        ²Input handlers
  276.    COnf        ¹AutoConfigs
  277.    MOni *      ¹Monitors (AmigaDOS 2.0 only)
  278.    PUbs *      ²Public Screens (AmigaDOS 2.0 only)
  279.   PowerVisor things :
  280.    FUnc        All ³Function monitor nodes (see 'addfunc' command)
  281.    FDfi        All ²fdfiles loaded (see 'loadfd' command)
  282.    Attc        All ²attached keys (see 'attach' command)
  283.    Crsh        All ²crashed programs
  284.    DBug        All ²debug nodes (see 'debug' tutor file)
  285.    STru        All ²structure defines (see 'addstruct' command)
  286.    LWin        All ²logical windows for PowerVisor
  287.    PWin        All ²physical windows for PowerVisor
  288.  
  289. Some examples :
  290.  
  291. < list exec <enter>
  292. > SoftVer      : 012F     | LowMemChkSum : 0000     | ChkBase      : F81FF833
  293. > ColdCapture  : 00000000 | CoolCapture  : 00000000 | WarmCapture  : 00000000
  294. > SysStkUpper  : 07E02230 | SysStkLower  : 07E00A30 | MaxLocMem    : 00200000
  295. > DebugEntry   : 00F82E88 | DebugData    : 00000000 | AlertData    : 00000000
  296. > MaxExtMem    : 00000000 | ChkSum       : A2BE     | ThisTask     : 07EA0B08
  297. > IdleCount    : 000045BE | DispCount    : 00005039 | Quantum      : 0004
  298. > Elapsed      : 0004     | SysFlags     : 0000     | IDNestCnt    : FF
  299. > TDNestCnt    : FF       | AttnFlags    : 0017     | AttnResched  : 0000
  300. > ResModules   : 07E00410 | TaskTrapCode : 07EA6924 | TaskExceptCod: 00F83AEC
  301. > TaskExitCode : 00F8242C | TaskSigAlloc : 0000FFFF | TaskTrapAlloc: 8000
  302. > VBlankFreq   : 32       | PowerSupplyFr: 32       | KickTagPtr   : 00000000
  303. > KickCheckSum : 00000000 | RamLibPrivate: 07E1E528 | EClockFreq   : 000AD303
  304. > CacheCtrl    : 00002919 | TaskID       : 00000001 | PuddleSize   : 00000000
  305. > MMULock      : 00000000 |
  306.  
  307. See the 'Expressions' tutorial file for what you can do with the ':'
  308. operator for this list and the two other lists : 'graf' and 'intb'.
  309. Note that the '&' ²unary operator can only be used with these three lists.
  310. The ':' operator can be used for almost any list except 'lock' and 'file'.
  311.  
  312. < list wins <enter>
  313. > Window name         : Address  Left  Top Width Height WScreen
  314. > ---------------------------------------------------------------------------
  315. >                     : 07EA7568    0   12   692    430 07EA6760
  316. >                     : 07E45E38    0    0   704    456 07E46110
  317. > My Shell            : 07E1FD48    0  568   692    456 07E2D258
  318. >                     : 07E3B398    0   16   692   1008 07E2D258
  319.  
  320.  
  321. You can use the 'curlist' function to see in which list we are. This function
  322. returns a pointer to the curlist string (in ¹ARexx this function returns
  323. a string). You can use the 'print' command to look at the current list :
  324.  
  325. < print \(curlist(),%s)\0a
  326. > task
  327.  
  328. (Since there is no newline in the current list string, there will be no
  329. newline printed on the screen).
  330.  
  331.  
  332. If you want the pointer to the first element in the list you can use the
  333. 'base' function :
  334.  
  335. < disp base() <enter>
  336. > 07E28330 , 132285232
  337.  
  338.  
  339. When you want to execute a specific command on each element in a list, you
  340. can use the 'for' command. This command is especially useful when using
  341. ¹tags (see the tag section).
  342. The command you give as an argument to the 'for' command is executed
  343. once for each element in the list. The command can find the pointer to
  344. the element in the list in the ²'rc' variable.
  345.  
  346. For example, to display all elements in a list :
  347.  
  348. < for task disp rc <enter>
  349. > 07E28330 , 132285232
  350. > 07E51458 , 132453464
  351. > 07E5B258 , 132493912
  352. > 07E609A8 , 132516264
  353. > 07E53F28 , 132464424
  354. > 07E1E6F0 , 132245232
  355. > 07E1EFE0 , 132247520
  356. > 07E51DC8 , 132455880
  357. > 07E0D992 , 132176274
  358. > 07E43418 , 132396056
  359. > 07E6E5C8 , 132572616
  360. > 07EA8348 , 132809544
  361. > 07E0A7C0 , 132163520
  362. > 07E0A428 , 132162600
  363. > 07E104E8 , 132187368
  364. > 07E16278 , 132211320
  365. > 07E189B0 , 132221360
  366. > 07E34200 , 132334080
  367. > 07E0F1B4 , 132182452
  368. > 07E08B22 , 132156194
  369. > 07E23BF8 , 132267000
  370. > 07EA9648 , 132814408
  371.  
  372.  
  373. More information about each list can be found in the 'List' tutorial file.
  374. In that tutorial file you can also find all the variables printed by
  375. the 'info' command (see below).
  376.  
  377.  
  378. =================== Asking more 'info' about something =======================
  379.  
  380. If you want more ¹¹information about something that is in a list, you can
  381. use the 'info' command :
  382.  
  383. Make the window list current :
  384.  
  385. < wins <enter>
  386.  
  387. < list <enter>
  388. > Window name         : Address  Left  Top Width Height WScreen
  389. > ---------------------------------------------------------------------------
  390. >                     : 07EA7568    0   12   692    430 07EA6760
  391. >                     : 07E45E38    0    0   704    456 07E46110
  392. > My Shell            : 07E1FD48    0  568   692    456 07E2D258
  393. >                     : 07E3B398    0   16   692   1008 07E2D258
  394.  
  395. You can now ask more info about 'My Shell' for example :
  396.  
  397. < info my <enter>
  398.  
  399. > Window name         : Address  Left  Top Width Height WScreen
  400. > ---------------------------------------------------------------------------
  401. > My Shell            : 07E1FD48    0  568   692    456 07E2D258
  402. >
  403. > MinWidth     : 0050     | MinHeight    : 0032     | MaxWidth     : FFFF
  404. > MaxHeight    : FFFF     | Flags        : 2800104F | MenuStrip    : 00000000
  405. > ScreenTitle  : Workbench Screen
  406. > FirstReques  : 00000000 | DMRequest    : 00000000 | ReqCount     : 0000
  407. > RPort        : 07E20068 | Pointer      : 00000000 | PtrHeight    : 00
  408. > PtrWidth     : 00       | XOffset      : 00       | YOffset      : 00
  409. > IDCMPFlags   : 00000000 | UserPort     : 00000000 | WindowPort   : 00000000
  410. > MessageKey   : 00000000 | DetailPen    : 00       | BlockPen     : 01
  411. > CheckMark    : 07E0B960 | ExtData      : 00000000 | UserData     : 00000000
  412. > BorderLeft   : 04       | BorderTop    : 10       | BorderRight  : 12
  413. > BorderBottom : 02       | BorderRPort  : 00000000 | Parent       : 07E3B398
  414. > Descendant   : 07EA7568 | GZZMouseX    : 005D     | GZZMouseY    : 00D6
  415. > GZZWidth     : 029E     | GZZHeight    : 01B6     | IFont        : 07E083F0
  416. > MoreFlags    : 00000000 |
  417. >
  418. > Flags: WINDOWSIZING WINDOWDRAG WINDOWDEPTH WINDOWCLOSE SIMPLEREFRESH ACTIVATE
  419. > VISITOR HASZOOM
  420. > IDCMP:
  421.  
  422. You get a lot of information. Basically this is the window structure.
  423.  
  424. Not all lists have that much extra information. Some lists give no extra
  425. information at all. Only the header is dumped.
  426.  
  427. IMPORTANT ! If 'wins' wasn't the current list you should ask information
  428. as follows :
  429.  
  430. First go to another current list :
  431.  
  432. < task <enter>
  433.  
  434. Ask information about 'My Shell' in the window list.
  435.  
  436. < info wins:my wins <enter>
  437. > ...
  438.  
  439. Especially the last 'wins' argument is very important. If you omit it
  440. PowerVisor will try to interprete the 'My Shell' window as a task or
  441. process. This can cause crashes. In general it is safest to always
  442. supply this extra argument. You may add it to the command even if
  443. the current list is already good.
  444.  
  445. You must also be careful using ²name expansion (don't type this) :
  446.  
  447. < info my wins <enter>
  448.  
  449. will NOT work when 'wins' is not the current list. This command can
  450. even crash. What happens is that PowerVisor first searches the current
  451. list for something that starts with 'my'. If you are so unlucky to really
  452. have a task starting with 'my' PowerVisor will then try to interprete
  453. that task as a window.
  454.  
  455. So you should really be careful when you use the 'info' command. Nasty things
  456. can happen when you are not careful enough about the current list and
  457. the arguments you give to 'info'. If you are cautious however, the 'info'
  458. command is really useful and can safe you lots of debugging time.
  459.  
  460.  
  461. Using the 'for' command (explained above), you can ask information about
  462. all items in a list.
  463.  
  464. For example, to dump info about each task in the system to a file (not
  465. to the screen), use :
  466.  
  467. < to ram:Info -for task {info rc task;print \0a\0a} <enter>
  468.  
  469. This is a rather complex example. I will explain it in detail.
  470.  
  471.    The 'to' command ³redirects the output of the following command to
  472.    the file 'ram:Info' (see the 'Screen' tutorial file for more info
  473.    about the 'to' command).
  474.  
  475.    The 'for' command is the command whose output is redirected (it
  476.    is an argument for the 'to' command). Because there is a '-' in
  477.    front of the 'for' no output is printed on the PowerVisor window.
  478.  
  479.    The 'for' command executes the following command for each element
  480.    in the 'task' list.
  481.  
  482.    The command that is executed for each element in the task list is
  483.    a ³group of commands.
  484.  
  485.    The first command in this group is the 'info' command. Its argument
  486.    is the ²'rc' variable which contains the pointer to the element
  487.    currently processed by the 'for' command. We add the 'task' argument
  488.    since we could as well execute this command with another current list.
  489.  
  490.    The second command in this group is the 'print' command. This
  491.    command prints two newlines after each info block.
  492.  
  493.    Since the 'for' command remembers all output in memory and only
  494.    starts printing after the list is traversed, you need not worry
  495.    about the list becoming corrupt after a long time (This is
  496.    especially true for the task list since this is a very busy list).
  497.  
  498. You could also have typed :
  499.  
  500. < -to ram:Info for task {info rc task;print \0a\0a} <enter>
  501.  
  502. But not :
  503.  
  504. < to ram:Info for task -{info rc task;print \0a\0a} <enter>
  505.  
  506. Since the 'for' command remembers all output even if the output is
  507. hidden.
  508.  
  509.  
  510. =========================== Viewing structures ===============================
  511.  
  512. PowerVisor also has the ability to ²²view structures. These structure are
  513. defined in ascii files and converted to ¹'pvsd'-files
  514. (³PowerVisor Structure Definition files) by the ¹'MStruct' utility.
  515. These ascii files look a bit like machinelanguage include files (see the
  516. examples in the Source subdirectory).
  517.  
  518. On the PowerVisor disk there is a file called ¹'Exec.pvsd'. This file contains
  519. all definitions for the structures in Exec 2.0. You can load all structures
  520. from this file using :
  521.  
  522. < addstruct exec.pvsd <enter>
  523. > UNIT
  524. > IS
  525. > IV
  526. > IO
  527. > IOSTD
  528. > LIB
  529. > LH
  530. > MLH
  531. > ML
  532. > ME
  533. > MH
  534. > MC
  535. > LN
  536. > MLN
  537. > MP
  538. > MN
  539. > RT
  540. > SSR
  541. > SS
  542. > SM
  543. > TC
  544. > ETask
  545. > StackSwapStruct
  546.  
  547. This command adds all structures to the 'stru' list. You can list this
  548. list to see all structures in memory :
  549.  
  550. < list stru <enter>
  551. > Struct node name    : Node     Pri InfoBlock Strings  Length
  552. > ---------------------------------------------------------------------------
  553. > IS                  : 07EBA5B0 FD  07EBA5D2  07E5A4D2     22
  554. > IV                  : 07EBA5F0 FD  07EBA612  07EBA63A     12
  555. > IO                  : 07EBA650 FD  07EBA672  07EBA6AA     32
  556. > LH                  : 07EBA888 FD  07EBA8AA  07EBA8E2     14
  557. > ML                  : 07EBA948 FD  07EBA96A  07E622AA     16
  558. > ME                  : 07EBA980 FD  07EBA9A2  07E622CA      8
  559. > MH                  : 07EBA9C0 FD  07EBA9E2  07EBAA1A     32
  560. > MC                  : 07EBAA50 FD  07EBAA72  07E706EA      8
  561. > LN                  : 07EBAA90 FD  07EBAAB2  07EBAAEA     14
  562. > MP                  : 07EBAB48 FD  07EBAB6A  07EBAB9A     34
  563. > MN                  : 07EBABB8 FD  07EBABDA  07EBABFA     20
  564. > RT                  : 07EBAC10 FD  07EBAC32  07EBAC92     26
  565. > SS                  : 07EBAD10 FD  07EBAD32  07EBAD6A     46
  566. > SM                  : 07EBADA0 FD  07EBADC2  07E5A602     36
  567. > TC                  : 07EBADD8 FD  07EBADFA  07EBAE9A     84
  568. > LIB                 : 07EBA788 FC  07EBA7EA  07EBA842     34
  569. > MLH                 : 07EBA900 FC  07EBA922  07EBA7AA     12
  570. > MLN                 : 07EBAB08 FC  07EBAB2A  07E73452      8
  571. > SSR                 : 07EBACD8 FC  07EBACFA  07E761FA     12
  572. > UNIT                : 07E5A5A8 FB  07EBA53A  07EB7BCA     38
  573. > IOSTD               : 07EBA6D0 FA  07EBA6F2  07EBA74A     48
  574. > ETask               : 07EBAF38 FA  07EBAF5A  07EBAFAA     86
  575. > StackSwapStruct     : 07EBAFF8 F0  07EBB032  07EBB05A     12
  576.  
  577. You can then use the 'remstruct' and 'clearstruct' commands to remove one
  578. structure or all structures from memory.
  579.  
  580. Now we interprete an element of the task list as a task :
  581.  
  582. < task <enter>
  583.  
  584. < list task <enter>
  585. > Task node name      : Node     Pri StackPtr  StackS Stat Command        Acc
  586. > ---------------------------------------------------------------------------
  587. > Background Process  : 07E28330 00  07E2D500    4096 Wait iprefs     (02) -
  588. > RexxMaster          : 07E51410 04  07E51C52    2048 Wait            (00) -
  589. > SYS:System/CLI      : 07E5DC50 00  07E5EB8E    4096 Wait            (00) -
  590. > Background Process  : 07E5B250 00  07E5D98A    4096 Wait addtools   (06) -
  591. > ...
  592. > input.device        : 07E08B22 14  07E09B28    4096 Wait            TASK -
  593. > RAM                 : 07E23BF8 0A  07E23EE6    1200 Wait            PROC -
  594. > Background Process  : 07E1F7C8 04  07E8C216   12000 Run  pv         (01) -
  595.  
  596. < interprete input tc <enter>
  597. > FLAGS        : 00       | STATE        : 04       | IDNESTCNT    : 00
  598. > TDNESTCNT    : FF       | SIGALLOC     : C000FFFF | SIGWAIT      : C0000000
  599. > SIGRECVD     : 00000000 | SIGEXCEPT    : 00000000 | ETask        : 80000000
  600. > EXCEPTDATA   : 00000000 | EXCEPTCODE   : 00F83AEC | TRAPDATA     : 00000000
  601. > TRAPCODE     : 00F83AEC | SPREG        : 07E09B28 | SPLOWER      : 07E08B7E
  602. > SPUPPER      : 07E09B7E | MEMENTRY     : 07E08B64 | Userdata     : 00000000
  603.  
  604. This command dumps the structure defined in the 'stru' list. ('tc' is
  605. the task structure).
  606.  
  607. You can also peek a certain value from this list with the 'peek' function :
  608.  
  609. < disp peek(input,tc,spupper) <enter>
  610. > 07E09B7E , 132160382
  611.  
  612. Or you can change a value (do not execute this command) :
  613.  
  614. < *apeek(input,tc,spupper).l=5 <enter>
  615.  
  616. You can use the 'stsize' function to ask the size of a structure :
  617.  
  618. < d stsize(ln) <enter>
  619. > 0000000E,14
  620.  
  621.  
  622. Structure definitions can also be used with the 'view' command (see below).
  623.  
  624.  
  625. =================== The tag system and the View command ======================
  626.  
  627. The most powerful command to ²²view memory is the 'view' command. This command
  628. uses ¹¹tags. A tag is a definition for a range of memory. Using tags you can
  629. define a region of memory to be code, or full ascii, ... . The 'view' command
  630. displays all memory according to its type.
  631.  
  632. In combination with ¹structures (see the previous section), this command has
  633. even more power (see the next section).
  634.  
  635. When you first start PowerVisor the 'view' command works exactly like
  636. the 'memory' command. This is because the default memory type for all
  637. memory that is not defined by a tag is Long/Ascii.
  638.  
  639. Lets explain all this with an example :
  640.  
  641. First we define the memory starting on location 0 as a range of longwords :
  642.  
  643. < addtag 0 50 la <enter>
  644.  
  645. This 'addtag' command adds a definition for a range of memory. A memory
  646. range with 50 bytes starting from address 0 is defined as LA. This is
  647. Long/Ascii. This is the default, so you won't see anything special when
  648. you view that memory.
  649.  
  650. < addtag 50 50 wa <enter>
  651.  
  652. The next 50 bytes of memory (starting on address 50) are defined as WA
  653. or Word/Ascii. We can use the 'view' command to see what we have done :
  654.  
  655. < view 0 <enter>
  656.  
  657. (Note that the 'view' command has the same sort of arguments as the 'memory'
  658. command).
  659.  
  660. > 00000000: 00000000 07E007CC 00F80834 00F80B16              ...........4....
  661. > 00000010: 00F80ADA 00F80ADC 00F80ADE 00F80AE0              ................
  662. > 00000020: 00F80C00 00F80AE4 00F80AE7 00F80AE8              ................
  663. > 00000030: 00F8                                             ..
  664. > 00000032: 0AEA 00F8 0AEC 00F8 0AEE 00F8 0AF0 00F8          ................
  665. > 00000042: 0AF2 00F8 0AF4 00F8 0AF6 00F8 0AF8 00F8          ................
  666. > 00000052: 0AFA 00F8 0AFC 00F8 0AFE 00F8 0B00 00F8          ................
  667. > 00000062: 0B02                                             ..
  668. > 00000064: 00F810F4 00F81152 00F81188 00F811E6              .......R........
  669. > 00000074: 00F8127C 00F812C6 00F81310 00F80B70              ...|...........p
  670. > 00000084: 00F80B72 00F80B74 00F80B76 00F80B78              ...r...t...v...x
  671. > 00000094: 00F80B7A 00F80B7C 00F80B7E 00F80B80              ...z...|...~....
  672. > 000000A4: 00F80B82 00F80B84 00F80B86 00F80B88              ................
  673. > 000000B4: 00F80B8A 00F80B8C 00F80B8E 00F80B90              ................
  674. > 000000C4: 00F80B92 00F80B94 00F80B96 00F80B98              ................
  675. > 000000D4: 00F80B9A 00F80B9C 00F80B9E 00F80BA0              ................
  676. > 000000E4: 00F80BA2 00F80BA4 00F80BA6 00F80BA8              ................
  677. > 000000F4: 00F80BAA 00F80BAC 00F80BAE 00000000              ................
  678. > 00000104: 00000000 00000000 00000000 00000000              ................
  679. > 00000114: 00000000 00000000 00000000 00000000              ................
  680. > 00000124: 00000000 00000000 00000000 00000000              ................
  681. > 00000134: 00000000 00000000 00000000                       ............
  682.  
  683. You can see that the memory starting at location 50 is listed in Word/Ascii
  684. format.
  685.  
  686. < addtag 100 50 ba <enter>
  687.  
  688. We define the next 50 bytes of memory as Byte/Ascii and :
  689.  
  690. < addtag 150 50 as <enter>
  691.  
  692. the next 50 bytes of memory as full Ascii and :
  693.  
  694. < addtag 200 50 co <enter>
  695.  
  696. the next 50 bytes of memory as code.
  697.  
  698. < view 0 <enter>
  699. > 00000000: 00000000 07E007CC 00F80834 00F80B16              ...........4....
  700. > 00000010: 00F80ADA 00F80ADC 00F80ADE 00F80AE0              ................
  701. > 00000020: 00F80C00 00F80AE4 00F80AE7 00F80AE8              ................
  702. > 00000030: 00F8                                             ..
  703. > 00000032: 0AEA 00F8 0AEC 00F8 0AEE 00F8 0AF0 00F8          ................
  704. > 00000042: 0AF2 00F8 0AF4 00F8 0AF6 00F8 0AF8 00F8          ................
  705. > 00000052: 0AFA 00F8 0AFC 00F8 0AFE 00F8 0B00 00F8          ................
  706. > 00000062: 0B02                                             ..
  707. > 00000064: 00 F8 10 F4 00 F8 11 52 00 F8 11 88 00 F8 11 E6  .......R........
  708. > 00000074: 00 F8 12 7C 00 F8 12 C6 00 F8 13 10 00 F8 0B 70  ...|...........p
  709. > 00000084: 00 F8 0B 72 00 F8 0B 74 00 F8 0B 76 00 F8 0B 78  ...r...t...v...x
  710. > 00000094: 00 F8                                            ..
  711. > 00000096: .z...|...~........................................
  712. > 000000C8: 00F8 0B94                     ORI.?    #$F8,($B94)
  713. > 000000CC: 00F8 0B96                     ORI.?    #$F8,($B96)
  714. > 000000D0: 00F8 0B98                     ORI.?    #$F8,($B98)
  715. > 000000D4: 00F8 0B9A                     ORI.?    #$F8,($B9A)
  716. > 000000D8: 00F8 0B9C                     ORI.?    #$F8,($B9C)
  717. > 000000DC: 00F8 0B9E                     ORI.?    #$F8,($B9E)
  718. > 000000E0: 00F8 0BA0                     ORI.?    #$F8,($BA0)
  719. > 000000E4: 00F8 0BA2                     ORI.?    #$F8,($BA2)
  720. > 000000E8: 00F8 0BA4                     ORI.?    #$F8,($BA4)
  721. > 000000EC: 00F8 0BA6                     ORI.?    #$F8,($BA6)
  722. > 000000F0: 00F8 0BA8                     ORI.?    #$F8,($BA8)
  723. > 000000F4: 00F8 0BAA                     ORI.?    #$F8,($BAA)
  724. > 000000F8: 00F8 0BAC                     ORI.?    #$F8,($BAC)
  725. > 000000FA: 0BAC00F8 0BAE0000 00000000 00000000              ................
  726. > 0000010A: 00000000 00000000 00000000 00000000              ................
  727. > 0000011A: 00000000 00000000 00000000 00000000              ................
  728. > 0000012A: 00000000 00000000 00000000 00000000              ................
  729. > 0000013A: 00000000 0000                                    ......
  730.  
  731. (The code example is useless in this case since that memory clearly isn't
  732. code).
  733. You can see that tags are very versatile. They can be very useful when you
  734. are debugging and do not want to loose track of all the different types of
  735. memory. If you still want to look at memory in a uniform way (either data
  736. or code) you can still use the 'memory' and 'unasm' commands. These commands
  737. ignore the tags.
  738.  
  739. You can see which tags are defined :
  740.  
  741. < tags <enter>
  742. > 00000000 : 00000032 LA
  743. > 00000032 : 00000032 WA
  744. > 00000064 : 00000032 BA
  745. > 00000096 : 00000032 AS
  746. > 000000C8 : 00000032 CO
  747.  
  748. (All values in this output are hexadecimal).
  749.  
  750. Note that it is possible to create ²overlapping tags. This is not encouraged
  751. since the search order of these tags is not defined. If you have an address
  752. that is defined in two different tags, you can never be sure which tag is
  753. taken as the correct one.
  754. However, PowerVisor will automatically detect overlapping tags when the
  755. new tag is not completely in another tag or when the new tag does not
  756. completely redefine another tag. In that case the other tag is made
  757. smaller.
  758.  
  759. You can remove a tag using the 'remtag' command :
  760.  
  761. < remtag 100 <enter>
  762.  
  763. will remove the definition for the range starting at address 100.
  764.  
  765. You can remove all tags at once with the 'cleartags' command.
  766.  
  767. < cleartags <enter>
  768. < tags <enter>
  769.  
  770. All tags are gone.
  771.  
  772. You can load and save tags using the 'loadtags' and 'savetags' commands.
  773.  
  774.  
  775. If you want different tag lists for different applications you can use any
  776. of the other 15 ²tag lists. PowerVisor has 16 tag lists numbered from 0 to
  777. 15. The default tag list is 0.
  778.  
  779. You can change the current tag list using the 'usetag' command :
  780.  
  781. < usetag 1 <enter>
  782.  
  783. will use tag list 1.
  784.  
  785. < usetag 0 <enter>
  786.  
  787. Back to tag list 0.
  788.  
  789. All commands on tags ('addtag', 'remtag', 'loadtags', 'savetags',
  790. 'cleartags', 'view', ...) only look at the ³current tag list.
  791.  
  792. You can temporarily set the current tag list using the 'tg' command :
  793.  
  794. < tg 1 view 0 <enter>
  795.  
  796. will view the memory starting at 0 using tag list 1. After the operation
  797. it will restore the current tag list.
  798.  
  799. Use the 'taglist' function to see the current tag list.
  800.  
  801. < disp taglist() <enter>
  802. > 00000000 , 0
  803.  
  804.  
  805. ======================== Using tags and structures ===========================
  806.  
  807. In the previous section we saw five different tag types :
  808.  
  809.    BA    Byte/Ascii
  810.    WA    Word/Ascii
  811.    LA    Long/Ascii
  812.    AS    Full Ascii
  813.    CO    Code
  814.  
  815. There is a sixth tag type :
  816.  
  817.    ST    Structure
  818.  
  819. We explain structure tags with an example :
  820.  
  821. Clear all structures and tags in memory :
  822.  
  823. < clearstruct <enter>
  824. < cleartags <enter>
  825.  
  826. Load the exec structure file :
  827.  
  828. < addstruct exec.pvsd <enter>
  829. > UNIT
  830. > IS
  831. > IV
  832. > IO
  833. > IOSTD
  834. > LIB
  835. > LH
  836. > MLH
  837. > ML
  838. > ME
  839. > MH
  840. > MC
  841. > LN
  842. > MLN
  843. > MP
  844. > MN
  845. > RT
  846. > SSR
  847. > SS
  848. > SM
  849. > TC
  850. > ETask
  851. > StackSwapStruct
  852.  
  853. (See the 'Structure' section for more info about these commands).
  854.  
  855. Now we can use these structures to define structure tags :
  856.  
  857. < task <enter>
  858.  
  859. < list <enter>
  860. > Task node name      : Node     Pri StackPtr  StackS Stat Command        Acc
  861. > ---------------------------------------------------------------------------
  862. > Background Process  : 07E28330 00  07E2D500    4096 Wait iprefs     (02) -
  863. > RexxMaster          : 07E4DD38 04  07E4E57A    2048 Wait            (00) -
  864. > PowerSnap 1.0 by Nic: 07E41B48 05  07E42392    2000 Wait            PROC -
  865. > ...
  866. > RAM                 : 07E23BF8 0A  07E23EE6    1200 Wait            PROC -
  867. > input.device        : 07E08B22 14  07E09B28    4096 Wait            TASK -
  868. > Background Process  : 07E72728 04  07E88122   12000 Run  pv         (05) -
  869.  
  870. < addtag ram stsize(tc) st tc <enter>
  871.  
  872. What have we done ? We have defined a new tag starting with the address
  873. of the RAM task. This tag defines a region of memory that is 'stsize(tc)'
  874. bytes big. 'stsize' is a function that returns the size of a structure.
  875. The structure is the 'TC' structure (task structure). The tag we define
  876. has type 'ST' (structure tag). When you use the 'ST' type for a tag
  877. you need another argument to 'addtag': the pointer to the structure
  878. definition. This is 'TC'.
  879.  
  880. < tags <enter>
  881. > 07E1E6F0 : 00000054 ST TC
  882.  
  883. Now we view the memory surrounding this task structure :
  884.  
  885. < view ram-50 <enter>
  886. > 07E1E6BE: 000001F8 57AB0000 000207E1 8A0C0000              ....W...........
  887. > 07E1E6CE: 00000000 125F0000 03F30000 0A090000              ....._..........
  888. > 07E1E6DE: 00000000 00000000 000001F8 2EBC0000              ................
  889. > 07E1E6EE: 0000                                             ..
  890. > 07E1E6F0: TC
  891. > FLAGS        : 00       | STATE        : 04       | IDNESTCNT    : 00
  892. > TDNESTCNT    : FF       | SIGALLOC     : 0000FFFF | SIGWAIT      : 00000010
  893. > SIGRECVD     : 00000100 | SIGEXCEPT    : 00000000 | ETask        : 80000000
  894. > EXCEPTDATA   : 00000000 | EXCEPTCODE   : 00F83AEC | TRAPDATA     : 00000000
  895. > TRAPCODE     : 00F8FFCE | SPREG        : 07E1EEF0 | SPLOWER      : 07E1E7D4
  896. > SPUPPER      : 07E1EFD4 | MEMENTRY     : 07E1E732 | Userdata     : 000007E1
  897. > 07E1E744: E5780000 00000000 00000000 00000000              .x..............
  898. > 07E1E754: 00000000 00000008 07E1E6F0 07E1E764              ...............d
  899. > 07E1E764: 00000000 07E1E760 00000000 01F87965              .......`......ye
  900. > 07E1E774: 00000800 07E0F944 00000000 01F879F5              .......D......y.
  901. > 07E1E784: 00000000 01FA2E94 00000000 00000000              ................
  902. > 07E1E794: 00000000 07E10544 00000000 07E1EFD0              .......D........
  903. > 07E1E7A4: 00000000 00000000 00000000 00000000              ................
  904. > 07E1E7B4: 00000000 00000000 00000000 07E1E7C4              ................
  905. > 07E1E7C4: 00000000 07E1E7C0 00000000 00000000              ................
  906. > 07E1E7D4: 00000000 00000000 00000000 00000000              ................
  907. > 07E1E7E4: 00000000 00000000 00000000 00000000              ................
  908. > 07E1E7F4: 00000000 00000000 0000                           ..........
  909.  
  910. The output is the same as with the 'interprete' command.
  911.  
  912.  
  913. Of course it would be cumbersome if you hade to repeat this procedure for
  914. each task in the task list. You can use the 'for' command to automate
  915. this process (also see the 'Listing Things' section) :
  916.  
  917. < for task addtag rc stsize(tc) st tc <enter>
  918.  
  919. This command will define a tag for each task in the task list.
  920.  
  921.  
  922. =================== Some miscellanious viewing commands ======================
  923.  
  924. PowerVisor also has a lot of other smaller view commands. These are all
  925. explained in this section.
  926.  
  927. You can list all ¹gadgets in a window with :
  928.  
  929. < list wins <enter>
  930. > Window name         : Address  Left  Top Width Height WScreen
  931. > ---------------------------------------------------------------------------
  932. >                     : 07EA69D8    0   12   692    430 07EA6378
  933. >                     : 07E45E38    0    0   704    456 07E46110
  934. > My Shell            : 07E1FD48    0  568   692    456 07E2D258
  935. >                     : 07E3B398    0   16   692   1008 07E2D258
  936.  
  937. < gadgets my <enter>
  938. > Gadget ptr : left right width height Render   Text     SpecInfo ID
  939. >
  940. > 07E100D4   :  -22     0    24     16 07E4687C 00000000 00000000     0
  941. > Flags      : GADGHCOMP GADGIMAGE GRELRIGHT LABELITEXT
  942. > Activation : RELVERIFY BORDERSNIFF
  943. > Type       : SYSGADGET WUPFRONT CUSTOMGADGET
  944. >
  945. > 07E10114   :  -45     0    24     16 07E489C4 00000000 00000000     0
  946. > Flags      : GADGHCOMP GADGIMAGE GRELRIGHT LABELITEXT
  947. > Activation : RELVERIFY BORDERSNIFF
  948. > Type       : SYSGADGET WDOWNBACK CUSTOMGADGET
  949. >
  950. > 07E1FDFC   :  -17    -9    18     10 07E48DF4 00000000 00000000     0
  951. > Flags      : GADGHCOMP GADGIMAGE GRELBOTTOM GRELRIGHT LABELITEXT
  952. > Activation : RELVERIFY BORDERSNIFF
  953. > Type       : SYSGADGET SIZING CUSTOMGADGET
  954. >
  955. > 07E1FE3C   :    0     0    20     16 07E58E0C 00000000 00000000     0
  956. > Flags      : GADGHCOMP GADGIMAGE LABELITEXT
  957. > Activation : RELVERIFY BORDERSNIFF
  958. > Type       : SYSGADGET CLOSE CUSTOMGADGET
  959. >
  960. > 07E1FE7C   :    0     0     0     15 00000000 00000000 00000000     0
  961. > Flags      : GADGHCOMP GADGIMAGE GRELWIDTH LABELITEXT
  962. > Activation : BORDERSNIFF
  963. > Type       : SYSGADGET WDRAGGING CUSTOMGADGET
  964.  
  965.  
  966. You can list all ¹hunks for a process with :
  967.  
  968. < list task <enter>
  969. > Task node name      : Node     Pri StackPtr  StackS Stat Command        Acc
  970. > ---------------------------------------------------------------------------
  971. > Background Process  : 07E28330 00  07E2CDD8    4096 Wait iprefs     (02) -
  972. > RexxMaster          : 07E51458 04  07E51C9A    2048 Wait            (00) -
  973. > Background Process  : 07E5B258 00  07E5AC9A    4096 Wait addtools   (06) -
  974. > ...
  975. > trackdisk.device    : 07E0F1B4 05  07E0F3C6     512 Wait            TASK -
  976. > input.device        : 07E08B22 14  07E09B28    4096 Wait            TASK -
  977. > RAM                 : 07E23BF8 0A  07E23EE6    1200 Wait            PROC -
  978. > Background Process  : 07EA7EA8 04  07EB231E   12000 Run  pv         (04) -
  979.  
  980. < hunks 07EA7EA8 <enter>
  981. > Nr    Hunk     Data         Size
  982. > ---------------------------------------------------------------------------
  983. >     0 07F0AD7C 07F0AD80    68628
  984. >     1 07EA8F44 07EA8F48     1256
  985. >     2 07EA1F5C 07EA1F60       48
  986. >     3 07EAE3AC 07EAE3B0     4572
  987. >     4 07EA677C 07EA6780      156
  988. >     5 07EA2124 07EA2128       28
  989. >     6 07EA681C 07EA6820      228
  990. >     7 07E280DC 07E280E0        8
  991.  
  992. You can ask the ¹pathname for a lock with the 'pathname' command. Note that
  993. you MUST use normal pointers for the 'pathname' command. The result from
  994. the AmigaDOS 'Lock' function is a ¹BPTR. You must convert this BPTR to
  995. an APTR.
  996.  
  997. You can use the 'libinfo' command to ask information about a
  998. ²library function in an fd-file you have loaded (see the 'Fd-File' tutorial
  999. for more information).
  1000.  
  1001. Use the 'llist' command to ³traverse a list with nodes. The argument to
  1002. this command is a node. 'llist' will then follow the ln_Succ field in this
  1003. node for all other nodes. It will display the addresses to these nodes :
  1004.  
  1005. < task <enter>
  1006.  
  1007. < llist df0 <enter>
  1008. > Node name           : Node     Pri
  1009. > ---------------------------------------------------------------------------
  1010. > Work                : 07E189B0 0A
  1011. > Workbench           : 07E34018 01
  1012. > input.device        : 07E08B22 14
  1013. > RAM                 : 07E23BF8 0A
  1014.  
  1015. Use the 'owner' command if you want to know the ¹owner of a piece of memory.
  1016. This command tries the best it can to find the owner. At this moment only
  1017. the 'task' list is searched.
  1018.  
  1019. < list task <enter>
  1020. > Task node name      : Node     Pri StackPtr  StackS Stat Command         Acc
  1021. > -----------------------------------------------------------------------------
  1022. > Background Process  : 07E45D88 00  07E571A8    4096 Rdy  clock      (04) -
  1023. > Background Process  : 07E28330 00  07E2D500    4096 Wait iprefs     (02) -
  1024. > RexxMaster          : 07E51410 04  07E51C52    2048 Wait            (00) -
  1025. > PowerSnap 1.0 by Nic: 07E43588 05  07E43DD2    2000 Wait            PROC -
  1026. > ...
  1027. > input.device        : 07E08B22 14  07E09B28    4096 Wait            TASK -
  1028. > RAM                 : 07E23BF8 0A  07E23EE6    1200 Wait            PROC -
  1029. > Background Process  : 07E1F7C8 04  07E8C216   12000 Run  pv         (01) -
  1030.  
  1031. < owner 07E51C52 <enter>
  1032. > Found in stack
  1033. > RexxMaster          : 07E51410 04  07E51C52    2048 Wait            (00) -
  1034.  
  1035.  
  1036. ================== Commands for MMU and other processors =====================
  1037.  
  1038. If you have an 68020, 68030 or 68040 you can use some extra commands.
  1039.  
  1040. You can use the 'specregs' command to view all ³special 680x0 registers :
  1041.  
  1042. < specregs <enter>
  1043. > MSP  : 560F5B16
  1044. > ISP  : 07E02228
  1045. > USP  : 07E8C304
  1046. > SFC  : 00000007
  1047. > DFC  : 00000007
  1048. > VBR  : 00000000
  1049. > CACR : 00002111
  1050. >    Write Allocate set
  1051. >    Disable Data Burst
  1052. >    Clear Data Cache not set
  1053. >    Clear Entry in Data Cache not set
  1054. >    Freeze Data Cache not set
  1055. >    Enable Data Cache
  1056. >    Enable Instruction Burst
  1057. >    Clear Instruction Cache not set
  1058. >    Clear Entry in Instruction Cache not set
  1059. >    Freeze Instruction Cache not set
  1060. >    Enable Instruction Cache
  1061. > CAAR : B8F77BED
  1062.  
  1063. For all following commands you need a ¹MMU. This means that you either
  1064. must have an ¹68851 or an 68030.
  1065. At this moment I have not tested PowerVisor on an ¹68040 processor. I suspect
  1066. there could be some problems. Especially the 'mmutree' and 'mmureset'
  1067. commands can cause problems on this new processor.
  1068.  
  1069. Also the 'mmureset' and 'mmutree' commands do not support everything from
  1070. the ¹68030 mmu. I suspect this is the reason that these commands perform
  1071. an infinite loop in ²AmigaDOS 1.3 on an ²Amiga 3000.
  1072.  
  1073. I have also not been able to test these commands on a computer other
  1074. than the Amiga 3000.
  1075.  
  1076. Use the 'mmuregs' command to view all ²mmu registers (registers extra in
  1077. the 68851 processor are not printed) :
  1078.  
  1079. < mmuregs <enter>
  1080. > CRP  : 000F0002   07FFF140
  1081. >    L/U bit is cleared
  1082. >    LIMIT = 0000000F
  1083. >    DT    = Valid 4 byte
  1084. >    Table address = 07FFF140
  1085. > SRP  : 80000001   00000000
  1086. >    L/U bit is set
  1087. >    LIMIT = 00000000
  1088. >    DT    = Page descriptor
  1089. >    Table address = 00000000
  1090. > TC   : 80F08630
  1091. >    Enable address translation
  1092. >    Disable Supervisor Root Pointer (SRP)
  1093. >    Disable Function Code Lookup (FCL)
  1094. >    System page size    = FFFF8000
  1095. >    Initial shift       = 00000000
  1096. >    Table Index A (TIA) = 00000008
  1097. >    Table Index B (TIB) = 00000006
  1098. >    Table Index C (TIC) = 00000003
  1099. >    Table Index D (TID) = 00000000
  1100. > TT0  : 04038207
  1101. >    Log Address Base = 00000004
  1102. >    Log Address Mask = 00000003
  1103. >    TT register enabled
  1104. >    No Cache Inhibit
  1105. >    R/W set
  1106. >    RWM cleared
  1107. >    FC value for TT block = 00000000
  1108. >    FC bits to be ignored = 00000007
  1109. > TT1  : 403F8107
  1110. >    Log Address Base = 00000040
  1111. >    Log Address Mask = 0000003F
  1112. >    TT register enabled
  1113. >    No Cache Inhibit
  1114. >    R/W cleared
  1115. >    RWM set
  1116. >    FC value for TT block = 00000000
  1117. >    FC bits to be ignored = 00000007
  1118.  
  1119. With the 'mmutree' command you can view the current mmu tree :
  1120.  
  1121. < mmutree <enter>
  1122. > 00000000   4 BYTE (imuw)  Log: 00000000 # 00000000
  1123. > 07FFF140      4 BYTE (imUw)  Log: 00000000 # 01000000
  1124. > 07FFF180         PAGE   (IMUw)  Log: 00000000 # 00040000  -> 00000000
  1125. > ...
  1126. > 07FFF274         PAGE   (iMUw)  Log: 00F40000 # 00040000  -> 00F40000
  1127. > 07FFF278         PAGE   (iMUW)  Log: 00F80000 # 00040000  -> 07F80000
  1128. > 07FFF27C         PAGE   (iMUW)  Log: 00FC0000 # 00040000  -> 07FC0000
  1129. > 07FFF144      PAGE   (iMUw)  Log: 01000000 # 01000000  -> 01000000
  1130. > 07FFF148      PAGE   (iMUw)  Log: 02000000 # 01000000  -> 02000000
  1131. > 07FFF14C      PAGE   (iMUw)  Log: 03000000 # 01000000  -> 03000000
  1132. > 07FFF150      PAGE   (iMUw)  Log: 04000000 # 01000000  -> 04000000
  1133. > 07FFF154      PAGE   (iMUw)  Log: 05000000 # 01000000  -> 05000000
  1134. > 07FFF158      PAGE   (iMUw)  Log: 06000000 # 01000000  -> 06000000
  1135. > 07FFF15C      4 BYTE (imUw)  Log: 07000000 # 01000000
  1136. > 07FFF280         INV    (imuw)  Log: 07000000 # 00040000
  1137. > ...
  1138. > 07FFF34C         INV    (imuw)  Log: 07CC0000 # 00040000
  1139. > 07FFF350         PAGE   (iMUw)  Log: 07D00000 # 00040000  -> 07D00000
  1140. > 07FFF354         INV    (imuw)  Log: 07D40000 # 00040000
  1141. > 07FFF358         INV    (imuw)  Log: 07D80000 # 00040000
  1142. > 07FFF35C         INV    (imuw)  Log: 07DC0000 # 00040000
  1143. > 07FFF360         PAGE   (iMUw)  Log: 07E00000 # 00040000  -> 07E00000
  1144. > 07FFF364         PAGE   (iMUw)  Log: 07E40000 # 00040000  -> 07E40000
  1145. > 07FFF368         PAGE   (iMUw)  Log: 07E80000 # 00040000  -> 07E80000
  1146. > 07FFF36C         PAGE   (iMUw)  Log: 07EC0000 # 00040000  -> 07EC0000
  1147. > 07FFF370         PAGE   (iMUw)  Log: 07F00000 # 00040000  -> 07F00000
  1148. > 07FFF374         PAGE   (iMUw)  Log: 07F40000 # 00040000  -> 07F40000
  1149. > 07FFF378         PAGE   (iMUW)  Log: 07F80000 # 00040000  -> 07F80000
  1150. > 07FFF37C         PAGE   (iMUW)  Log: 07FC0000 # 00040000  -> 07FC0000
  1151. > 07FFF160      PAGE   (iMUw)  Log: 08000000 # 01000000  -> 08000000
  1152. > 07FFF164      PAGE   (iMUw)  Log: 09000000 # 01000000  -> 09000000
  1153. > 07FFF168      PAGE   (iMUw)  Log: 0A000000 # 01000000  -> 0A000000
  1154. > 07FFF16C      PAGE   (iMUw)  Log: 0B000000 # 01000000  -> 0B000000
  1155. > 07FFF170      PAGE   (iMUw)  Log: 0C000000 # 01000000  -> 0C000000
  1156. > 07FFF174      PAGE   (iMUw)  Log: 0D000000 # 01000000  -> 0D000000
  1157. > 07FFF178      PAGE   (iMUw)  Log: 0E000000 # 01000000  -> 0E000000
  1158.  
  1159. With the 'mmureset' command you can reset the 'M' and 'U' bits in this
  1160. tree. So you can see which pages are used and modified.
  1161.